From: Sam Reed Date: Fri, 6 Aug 2010 11:20:39 +0000 (+0000) Subject: Reduce unnecessary seperate nested if's, move them up to the top if (as per most... X-Git-Tag: 1.31.0-rc.0~35675 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=e2ec02531d4b6194ad7370c87aad3fbcc93af2b3;p=lhc%2Fweb%2Fwiklou.git Reduce unnecessary seperate nested if's, move them up to the top if (as per most of the others where this is necessary!) --- diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 793c2744fa..6e26b30741 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -141,19 +141,15 @@ class ApiParamInfo extends ApiBase { if ( isset( $p[ApiBase::PARAM_DFLT] ) ) { $a['default'] = $p[ApiBase::PARAM_DFLT]; } - if ( isset( $p[ApiBase::PARAM_ISMULTI] ) ) { - if ( $p[ApiBase::PARAM_ISMULTI] ) { - $a['multi'] = ''; - $a['limit'] = $this->getMain()->canApiHighLimits() ? - ApiBase::LIMIT_SML2 : - ApiBase::LIMIT_SML1; - } + if ( isset( $p[ApiBase::PARAM_ISMULTI] ) && $p[ApiBase::PARAM_ISMULTI] ) { + $a['multi'] = ''; + $a['limit'] = $this->getMain()->canApiHighLimits() ? + ApiBase::LIMIT_SML2 : + ApiBase::LIMIT_SML1; } - if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) ) { - if ( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) { - $a['allowsduplicates'] = ''; - } + if ( isset( $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) && $p[ApiBase::PARAM_ALLOW_DUPLICATES] ) { + $a['allowsduplicates'] = ''; } if ( isset( $p[ApiBase::PARAM_TYPE] ) ) {